<div
  local-class='list-item {{if @master "list-item--master"}} {{if this.isPromoting "list-item--promoting"}} {{if this.isDeleting "list-item--deleting"}} {{if
    this.isDeleted
    "list-item--deleted"
  }}'
>
  <div local-class='list-item-header'>
    {{#if this.isDeleted}}
      <span local-class='list-link'>{{this.name}}</span>
    {{else}}
      <LinkTo @route='logged-in.project.revision.translations' @models={{array @project.id @revision.id}} local-class='list-link'>
        {{this.name}}
        <small local-class='list-link-small'>
          {{this.slug}}
        </small>
      </LinkTo>
    {{/if}}

    {{#if @revision.isMaster}}
      <AccBadge local-class='masterBadge'>
        {{t 'components.project_manage_languages_overview.master_badge'}}
      </AccBadge>
    {{/if}}
  </div>

  <div local-class='list-item-infos'>
    {{#unless @revision.isMaster}}
      <div local-class='list-item-infos-date'>
        {{#if this.isDeleted}}
          {{t 'components.project_manage_languages_overview.revision_deleted_label'}}
        {{else}}
          {{t 'components.project_manage_languages_overview.revision_inserted_at_label'}}
          <TimeAgoInWordsTag @date={{@revision.insertedAt}} />
        {{/if}}
      </div>

      {{#unless this.isDeleted}}
        <div local-class='list-item-actions'>
          {{#if (get @permissions 'promote_slave')}}
            <AsyncButton
              @loading={{this.isPromoting}}
              local-class='promoteSlaveButton'
              class='button--white button--filled button--small button--link'
              @onClick={{fn this.promoteRevision}}
            >
              {{inline-svg '/assets/chevron-top.svg' class='button-icon'}}
              {{t 'components.project_manage_languages_overview.promote_revision_master_button'}}
            </AsyncButton>
          {{/if}}

          {{#unless this.isDeleted}}
            <LinkTo
              @route='logged-in.project.manage-languages.edit'
              @models={{array @project.id @revision.id}}
              class='button button--filled button--white button--link button--iconOnly button--small'
            >
              {{inline-svg '/assets/pencil.svg' class='button-icon'}}
            </LinkTo>
          {{/unless}}

          {{#if (get @permissions 'delete_slave')}}
            <AsyncButton @loading={{this.isDeleting}} class='button--red button--borderless button--iconOnly button--small' @onClick={{fn this.deleteRevision}}>
              {{inline-svg '/assets/x.svg' class='button-icon'}}
            </AsyncButton>
          {{/if}}
        </div>
      {{/unless}}
    {{/unless}}
  </div>
</div>